import { lazy } from "react";
import { Redirect } from "react-router-dom";

const HomePage = lazy(() => import("../pages/home"));
const CartPage = lazy(() => import("../pages/cart"));
const MyPage = lazy(() => import("../pages/my"));


export const routes = [
  {
    path: "/",
    exact: true,
    render: () => <Redirect to="/home" />,
  },
  {
    path: "/home",
    component: HomePage,
  },
  {
    path: "/cart",
    component: CartPage,
  },
  {
    path: "/my",
    component: MyPage,
  },
];
